library ieee;
use ieee.std_logic_1164.all;

entity de2_ps2_keyb_top is
  port (
    clock   : in std_logic;
    reset_n : in std_logic;

    sram_addr_from_the_sram      : out std_logic_vector (17 downto 0);
    sram_ce_n_from_the_sram      : out std_logic;
    sram_dq_to_and_from_the_sram : inout std_logic_vector (15 downto 0);
    sram_lb_n_from_the_sram      : out std_logic;
    sram_oe_n_from_the_sram      : out std_logic;
    sram_ub_n_from_the_sram      : out std_logic;
    sram_we_n_from_the_sram      : out std_logic;

    dev_clk_to_the_keyboard      : in std_logic;
    dev_dat_to_the_keyboard      : in std_logic
  );
end entity de2_ps2_keyb_top;

architecture default of de2_ps2_keyb_top is
  component ps2_kb_sopc is 
  port (
    clock   : in std_logic;
    reset_n : in std_logic;

    sram_addr_from_the_sram      : out std_logic_vector (17 downto 0);
    sram_ce_n_from_the_sram      : out std_logic;
    sram_dq_to_and_from_the_sram : inout std_logic_vector (15 downto 0);
    sram_lb_n_from_the_sram      : out std_logic;
    sram_oe_n_from_the_sram      : out std_logic;
    sram_ub_n_from_the_sram      : out std_logic;
    sram_we_n_from_the_sram      : out std_logic;

    dev_clk_to_the_keyboard      : in std_logic;
    dev_dat_to_the_keyboard      : in std_logic
  );
  end component ps2_kb_sopc;
begin
  de2_kb_sopc_inst : component ps2_kb_sopc
  port map(
    clock => clock,
    reset_n => reset_n,

    sram_addr_from_the_sram      => sram_addr_from_the_sram,
    sram_ce_n_from_the_sram      => sram_ce_n_from_the_sram,
    sram_dq_to_and_from_the_sram => sram_dq_to_and_from_the_sram,
    sram_lb_n_from_the_sram      => sram_lb_n_from_the_sram,
    sram_oe_n_from_the_sram      => sram_oe_n_from_the_sram,
    sram_ub_n_from_the_sram      => sram_ub_n_from_the_sram,
    sram_we_n_from_the_sram      => sram_we_n_from_the_sram,

    dev_clk_to_the_keyboard      => dev_clk_to_the_keyboard,
    dev_dat_to_the_keyboard      => dev_dat_to_the_keyboard
  );
end architecture default;
